Optimal. Leaf size=190 \[ \frac {4 i \sqrt {b} p^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )^2}{\sqrt {a}}+\frac {8 \sqrt {b} p^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (\frac {2 \sqrt {a}}{\sqrt {a}+i \sqrt {b} x}\right )}{\sqrt {a}}+\frac {4 \sqrt {b} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt {a}}-\frac {\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}+\frac {4 i \sqrt {b} p^2 \text {Li}_2\left (1-\frac {2 \sqrt {a}}{\sqrt {a}+i \sqrt {b} x}\right )}{\sqrt {a}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 190, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 8, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {2507, 211,
2520, 12, 5040, 4964, 2449, 2352} \begin {gather*} \frac {4 i \sqrt {b} p^2 \text {PolyLog}\left (2,1-\frac {2 \sqrt {a}}{\sqrt {a}+i \sqrt {b} x}\right )}{\sqrt {a}}+\frac {4 \sqrt {b} p \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt {a}}+\frac {4 i \sqrt {b} p^2 \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )^2}{\sqrt {a}}+\frac {8 \sqrt {b} p^2 \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (\frac {2 \sqrt {a}}{\sqrt {a}+i \sqrt {b} x}\right )}{\sqrt {a}}-\frac {\log ^2\left (c \left (a+b x^2\right )^p\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 211
Rule 2352
Rule 2449
Rule 2507
Rule 2520
Rule 4964
Rule 5040
Rubi steps
\begin {align*} \int \frac {\log ^2\left (c \left (a+b x^2\right )^p\right )}{x^2} \, dx &=-\frac {\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}+(4 b p) \int \frac {\log \left (c \left (a+b x^2\right )^p\right )}{a+b x^2} \, dx\\ &=\frac {4 \sqrt {b} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt {a}}-\frac {\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}-\left (8 b^2 p^2\right ) \int \frac {x \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b} \left (a+b x^2\right )} \, dx\\ &=\frac {4 \sqrt {b} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt {a}}-\frac {\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}-\frac {\left (8 b^{3/2} p^2\right ) \int \frac {x \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a+b x^2} \, dx}{\sqrt {a}}\\ &=\frac {4 i \sqrt {b} p^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )^2}{\sqrt {a}}+\frac {4 \sqrt {b} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt {a}}-\frac {\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}+\frac {\left (8 b p^2\right ) \int \frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{i-\frac {\sqrt {b} x}{\sqrt {a}}} \, dx}{a}\\ &=\frac {4 i \sqrt {b} p^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )^2}{\sqrt {a}}+\frac {8 \sqrt {b} p^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (\frac {2 \sqrt {a}}{\sqrt {a}+i \sqrt {b} x}\right )}{\sqrt {a}}+\frac {4 \sqrt {b} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt {a}}-\frac {\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}-\frac {\left (8 b p^2\right ) \int \frac {\log \left (\frac {2}{1+\frac {i \sqrt {b} x}{\sqrt {a}}}\right )}{1+\frac {b x^2}{a}} \, dx}{a}\\ &=\frac {4 i \sqrt {b} p^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )^2}{\sqrt {a}}+\frac {8 \sqrt {b} p^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (\frac {2 \sqrt {a}}{\sqrt {a}+i \sqrt {b} x}\right )}{\sqrt {a}}+\frac {4 \sqrt {b} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt {a}}-\frac {\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}+\frac {\left (8 i \sqrt {b} p^2\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+\frac {i \sqrt {b} x}{\sqrt {a}}}\right )}{\sqrt {a}}\\ &=\frac {4 i \sqrt {b} p^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )^2}{\sqrt {a}}+\frac {8 \sqrt {b} p^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (\frac {2 \sqrt {a}}{\sqrt {a}+i \sqrt {b} x}\right )}{\sqrt {a}}+\frac {4 \sqrt {b} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt {a}}-\frac {\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}+\frac {4 i \sqrt {b} p^2 \text {Li}_2\left (1-\frac {2 \sqrt {a}}{\sqrt {a}+i \sqrt {b} x}\right )}{\sqrt {a}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 173, normalized size = 0.91 \begin {gather*} \frac {4 i \sqrt {b} p^2 x \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )^2-\sqrt {a} \log ^2\left (c \left (a+b x^2\right )^p\right )+4 \sqrt {b} p x \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (2 p \log \left (\frac {2 i}{i-\frac {\sqrt {b} x}{\sqrt {a}}}\right )+\log \left (c \left (a+b x^2\right )^p\right )\right )+4 i \sqrt {b} p^2 x \text {Li}_2\left (\frac {i \sqrt {a}+\sqrt {b} x}{-i \sqrt {a}+\sqrt {b} x}\right )}{\sqrt {a} x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.05, size = 0, normalized size = 0.00 \[\int \frac {\ln \left (c \left (b \,x^{2}+a \right )^{p}\right )^{2}}{x^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\log {\left (c \left (a + b x^{2}\right )^{p} \right )}^{2}}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\ln \left (c\,{\left (b\,x^2+a\right )}^p\right )}^2}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________